package com.lc.service;

import com.lc.mapper.OrderMapper;
import com.lc.pojo.Car;
import com.lc.pojo.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService{
    @Autowired
    OrderMapper orderMapper;
    @Override
    public boolean updateOrder(Order order){
        int flag = 0;
        try {
            flag = orderMapper.updateOrder(order);
        } catch (Exception e) {
            return false;
        }
        if (flag == 1) {
            return true;
        } else {
            return false;
        }
    }
    @Override
    public boolean addOrder(Order order){
        int flag = 0;
        try {
            flag = orderMapper.addOrder(order);
        } catch (Exception e) {
            return false;
        }
        if (flag == 1) {
            return true;
        } else {
            return false;
        }
    }
}
